//
//  TopView.m
//  DriftDog
//
//  Created by rimi on 15/9/8.
//  Copyright (c) 2015年 廖马林. All rights reserved.
//

#import "TopView.h"


@interface TopView ()

-(void)initliedUserinterface;
@end
@implementation TopView

-(instancetype)initWithFrame:(CGRect)frame{
    
    self=[super initWithFrame:frame];
    if (self) {
        [self initliedUserinterface];
        
    }
    return self;
}
-(void)initliedUserinterface{
    [self addSubview:self.image];
    [self addSubview:self.labelName];
    
    
}

-(UIImageView*)image{
    
    if (!_image) {
        _image=[[UIImageView alloc]initWithFrame:DHFlexibleFrame(CGRectMake(10, 30, 60, 60), NO)];
        _image.backgroundColor=[UIColor whiteColor];
        _image.layer.cornerRadius=28*DHFlexibleHorizontalMutiplier();
        _image.clipsToBounds=YES;
    }
    return _image;
    
}

-(UILabel *)labelName{
    if (!_labelName) {
        _labelName=[[UILabel alloc]initWithFrame:DHFlexibleFrame(CGRectMake(10, 100, 70, 15), NO)];
        _labelName.backgroundColor=[UIColor whiteColor];
    }
    
    return _labelName;
    
}
@end
